import './assets/main.css'

import { createApp } from 'vue';
import App from './App.vue';
import router from './router/index';
//导入element ui 
import ElementPlus from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import 'element-plus/dist/index.css'
import { initSessionTimeout } from './initSessionTimeout/initSessionTimeout'




//引入axios
import axios from 'axios';
//引入stoer
import { createPinia } from 'pinia';

const app = createApp(App);
const pinia = createPinia();

app.use(pinia);
app.use(router); //路由
// 全局配置中文
app.use(ElementPlus, { locale: zhCn })

app.config.globalProperties.$axios = axios; //axios 请求

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//挂载
app.mount('#app')

initSessionTimeout()
